import type { DailyDataParams, DailyDataResponse, DayReportParams, DayReportResponse, MonthlyReportParams, MonthlyReportResponse, YingshouReportResponse } from './types';
import { post } from '@/utils/request';

// 获取日报告
export const getDayReport = (data: DayReportParams) => post<DayReportResponse>('/syapi/report/day_report', { data });

// 获取七日销售趋势数据
export const getDailyData = (data: DailyDataParams) => post<DailyDataResponse>('/syapi/report/daily_data', { data });

// 获取月度报告（用于计算月销售额）
export const getMonthlyReport = (data: MonthlyReportParams) => post<MonthlyReportResponse>('/syapi/report/report', { data });

// 获取营收数据（用于销量统计）
export const getYingshouReport = () => post<YingshouReportResponse>('/syapi/report/yingshou');
